const dataBefore = [
    {
        startAge: 0,
        startAgeSign: 2,
        endAge: 20,
        endAgeSign: 2,
        rows: [
            // 新增
            {
                id: '6c3628339489479c84ad7de81d6d83f5',
                twStartAmt: '10.00',
                twStartAmtSign: 1,
                twEndAmt: '20.00',
                twEndAmtSign: 2,
                rowStatus: 2
            },
            {
                id: '6c3628339489479c84ad7de81d6d83f5',
                twStartAmt: '10.00',
                twStartAmtSign: 1,
                twEndAmt: '20.00',
                twEndAmtSign: 2,
                employeeShare: '10.00%(TW - $30.00)',
                companyShare: '10.00%(AW)',
                totalShare: '10.00%(AW) + 10.00%(TW - $30.00)',
                rowStatus: 3,
                companyShareStatus: 1,
                employeeShareStatus: 1,
                totalShareStatus: 1
            },
            {
                id: '63aecd8c6a8a425fbe35eb71221dca94',
                twStartAmt: '20.00',
                twStartAmtSign: 1,
                twEndAmt: '30.00',
                twEndAmtSign: 2,
                employeeShare: '10.00%(OW)',
                companyShare: '20.00%(OW)',
                totalShare: '30.00%(OW)'
            }
        ]
    },
    {
        startAge: 20,
        startAgeSign: 1,
        endAge: null,
        endAgeSign: 2,
        rows: [
            {
                id: '2dcbe04f7e374a418a03b4b4a71bfb52',
                twStartAmt: '100.00',
                twStartAmtSign: 1,
                twEndAmt: '2000.00',
                twEndAmtSign: 2,
                employeeShare: '10.00%(AW)',
                companyShare: '20.00%(OW)',
                totalShare: '10.00%(AW) + 20.00%(OW)',
                isCompanyShare: 1,
                isEmployeeShare: 1,
                isTotalShare: 1
            }
        ]
    }
];

const dataAfter = [
    {
        startAge: 0,
        startAgeSign: 2,
        endAge: 20,
        endAgeSign: 2,
        rows: [
            {
                id: '6c3628339489479c84ad7de81d6d83f5',
                twStartAmt: '10.00',
                twStartAmtSign: 1,
                twEndAmt: '20.00',
                twEndAmtSign: 2,
                employeeShare: '10.00%(TW - $30.00)',
                companyShare: '10.00%(AW)',
                totalShare: '10.00%(AW) + 10.00%(TW - $30.00)',
                rowStatus: 2
            },
            {
                id: '6c3628339489479c84ad7de81d6d83f5',
                twStartAmt: '10.00',
                twStartAmtSign: 1,
                twEndAmt: '20.00',
                twEndAmtSign: 2,
                employeeShare: '10.00%(TW - $30.00)',
                companyShare: '10.00%(AW)',
                totalShare: '10.00%(AW) + 10.00%(TW - $30.00)',
                rowStatus: 3,
                companyShareStatus: 1,
                employeeShareStatus: 1,
                totalShareStatus: 1
            },
            {
                id: '63aecd8c6a8a425fbe35eb71221dca94',
                twStartAmt: '20.00',
                twStartAmtSign: 1,
                twEndAmt: '30.00',
                twEndAmtSign: 2,
                employeeShare: '10.00%(OW)',
                companyShare: '20.00%(OW)',
                totalShare: '30.00%(OW)',
                rowStatus: 1
            }
        ]
    },
    {
        startAge: 20,
        startAgeSign: 1,
        endAge: null,
        endAgeSign: 2,
        rows: [
            {
                id: '2dcbe04f7e374a418a03b4b4a71bfb52',
                twStartAmt: '100.00',
                twStartAmtSign: 1,
                twEndAmt: '2000.00',
                twEndAmtSign: 2,
                employeeShare: '10.00%(AW)',
                companyShare: '20.00%(OW)',
                totalShare: '10.00%(AW) + 20.00%(OW)',
                isCompanyShare: 1,
                isEmployeeShare: 1,
                isTotalShare: 1
            }
        ]
    }
];

const search = () => ({
        code: 10000,
        data: {
            approveNo: 'CPFAPPROVAL20210622',
            approveName: 'Elizabeth',
            approveDate: new Date(),
            department: 'UXC',
            tableObject: 'PR1(F/G)',
            effectTime: '2021-07-30',
            tip: 'Pls approval asap',
            dataBefore,
            dataAfter
        }
    });

export default {
    'GET x/api/finance/salary/v1/setting/cpf/nextStep/*': (req, res) => {
        res.json(search(req));
    }
};
